1. Field of the Invention
This invention relates to systems and methods for controlling an array of disk drives in a computer system and, more particularly, to a system and method wherein cached data is selectively written-back to a disk drive array.
2. Background of the Relevant Art
In the past several years, a new trend in mass storage subsystems has emerged for improving the performance, capacity, cost, and reliability associated with the storage of data. This trend involves an increase in the use of what are generally referred to as disk array subsystems. A number of reference articles that describe the design and characteristics of disk array subsystems have been published, including the articles: "Introduction to Redundant Arrays of Inexpensive Disks (RAID)" by D. Patterson, P. Chen, G. Gibson and R. Katz, IEEE, 1989; "Coding Techniques for Handling Failures in Large Disk Arrays" by G. Gibson, L. Hellerstein, R. Karp, R. Katz and D. Patterson, Report No. UCB/CSD 88/477, December 1988, Computer Science Division, University of California Berkeley; and "A Case Study for Redundant Arrays of Inexpensive Disks (RAID)" by D. Patterson, G. Gibson, and R. Katz, presented at the June 1988 ACM SIGMOD Conference in Chicago, Ill.
Generally speaking, a disk array subsystem includes an array of standard disk drives, referred to collectively as a "composite" drive, coupled in parallel. The disk array subsystem further includes a drive array controller for interfacing the composite drive to a computer system. The drive array controller, which is generally installable on an expansion bus of the computer system, converts input-output ("I/O") read and write requests into a sequence of seeks, delays and other disk commands to read data from or write data to the composite drive.
A drive array controller differs from a conventional disk drive controller (i.e., a single disk controller) in that, with respect to the drive array controller, the set of disk drives coupled thereto emulate a single disk drive having a greater capacity and a higher performance than any individual disk drive included as a portion thereof. To perform an access to a virtual composite drive location within the composite drive, the drive array controller must be cognizant of both the position of the particular disk drive to be accessed as well as the physical sector location within that disk drive which corresponds to the virtual composite drive location for which access is sought. Various hardware anti software implementations are well-known for performing these functions.
A significant concern relating to the mass storage of data within disk array subsystems is the possibility of data loss or corruption due to drive failure. A variety of data redundancy and recovery techniques have therefore been proposed to allow restoration of data in the event of a drive failure. Exemplary techniques are discussed within, for example, the previously-mentioned articles. One technique commonly referred to as a "level 1 RAID" technique involves the use of a mirrored drive. The level 1 RAID technique in effect provides a redundant data drive for each primary data drive. A write to a disk array utilizing the level 1 RAID technique will result in a write to the, primary data disk and a write to its mirror drive. If a failure in one of the primary data, drives occurs, the system can access the redundant data in the mirror drive until the failed drive is replaced. This technique results in a minimum loss of performance in the disk array. However, a significant disadvantage of the level 1 RAID technique is that 50% of the total data storage space must be allocated for redundancy purposes. Therefore, a relatively high cost of storage per byte results.
Another data redundancy and recovery technique commonly referred to as a "level 4 RAID" technique involves the use of a parity scheme. By calculating and storing the parity of a group of data disks on a per-bit basis, any single disk failure can be corrected simply by reading the rest of the disks in the group to determine what bit value on the failed disk would give the proper parity. As will be considered in further detail below, the parity information is initially obtained by performing a logical exclusive-OR (XOR) operation on each corresponding bit of the data disks. The parity information is then stored within a reserved drive referred to as a "parity drive".
An advantage of the level 4 RAID technique is that the amount of data storage dedicated to data redundancy and recovery is minimized. For example, in an eight drive array, the parity technique requires that only one of the drives be used for parity information; therefore, 12.5% of total storage is dedicated to redundancy as compared to 50% using the mirrored drive technique. As a result, the level 4 RAID technique decreases the cost of data storage in comparison to the level 1 RAID technique while still providing for data recovery.
A disadvantage of the level 4 RAID technique is the loss of write performance within the disk array. Write throughput is limited since the parity drive must be updated each time new data is written to one of the data drives. To update the parity drive, the new data being written must first undergo an exclusive-OR logical operation with the old data that will be overwritten within the data drive. That result must then be exclusive-ORed with the old parity data stored in the corresponding location of the parity drive. This requirement severely degrades write performance.
Another data redundancy and recovery technique referred to as a "level 5 RAID" technique also involves the use of an XOR parity scheme. The level 5 RAID technique is similar to level 4 RAID except that, with respect to level 5 RAID, the data and parity information is distributed per sector across all the disks in the array rather than reserving a dedicated disk solely for parity information. By distributing the data and parity information across all the disks, the write throughput may be somewhat improved since parity data may be updated within different drives simultaneously.
Despite the improved write throughput of level 5 RAID, it continues to be desirable to provide a disk array subsystem having even better write throughput characteristics while maintaining the advantages of data redundancy and low cost.